import storageApi from '../../core/storage/storage';

@Inject('$log', '$rootScope', 'codeRulesService')
class DeviceEncodingRulesController {
  constructor() {
    const id = this.$rootScope.orgId || storageApi.get('orgId');
    this.$getRules(id);
  }

  $getRules(id) {
    this.codeRulesService
      .getDevice({ orgId: id })
      .then((res) => {
        this.$log.debug(res);
        this.ruleMap = res.data;
      });
  }

}

export default DeviceEncodingRulesController;
